<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>邮件测试</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.13/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.14/index.js"></script>
    <link href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.14/theme-chalk/index.css" rel="stylesheet">
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/1.5.0/axios.js"></script>

</head>
<body>
<div id="app">
    <el-input v-model="email" placeholder="请输入邮箱"></el-input>
    <el-button type="primary" @click="sendCode">发送验证码</el-button>
</div>
</body>
<script>
    new Vue({
        el: "#app",
        data(){
            return {
                email:''
            }
        },
        methods: {
            sendCode(){
                axios.post(`/email/${this.email}`).then(resp=>{
                    this.$message.success('发送成功')
                })
            }
        }
    })
</script>
</html>